//**********流程运行时接口***********/;
import request from '@/utils/request.js';

/**
 * 获取用户任务节点表单ID
 * @doc http://hanma-lesscode.hc-iiot.com/swagger-ui.html#!/
 * params 参数 
 * taskId:'', //taskId 必填
 * @returns
 * ********
 */
export function getHmprocessruntimeHistorictaskformkey(params={}, config={}){
  return request({
    method: 'get',
    params,
    url: `/api/hm-process-runtime/historic-task-form-key`,
    ...config,
  }) 
}

/**
 * 我发起的请求
 * @doc http://hanma-lesscode.hc-iiot.com/swagger-ui.html#!/
 * ********
 * @returns
 * ********
 */
export function getHmprocessruntimeProcessMystart(config={}){
  return request({
    method: 'get',
    url: `/api/hm-process-runtime/process/my-start`,
    ...config,
  }) 
}

/**
 * 我发起的完成的流程任务
 * @doc http://hanma-lesscode.hc-iiot.com/swagger-ui.html#!/
 * params 参数 
 * processId:'', //流程ID 非必填
 * searchKey:'', //搜索关键字 非必填
 * pageNo:'', //页码 非必填
 * pageSize:'', //每页数据条数 非必填
 * @returns
 * ********
 */
export function getHmprocessruntimeProcessMystartfinish(params={}, config={}){
  return request({
    method: 'get',
    params,
    url: `/api/hm-process-runtime/process/my-start-finish`,
    ...config,
  }) 
}

/**
 * 我发起的处理中的流程任务
 * @doc http://hanma-lesscode.hc-iiot.com/swagger-ui.html#!/
 * params 参数 
 * processId:'', //流程ID 非必填
 * searchKey:'', //搜索关键字 非必填
 * pageNo:'', //页码 非必填
 * pageSize:'', //每页数据条数 非必填
 * @returns
 * ********
 */
export function getHmprocessruntimeProcessMystarttodo(params={}, config={}){
  return request({
    method: 'get',
    params,
    url: `/api/hm-process-runtime/process/my-start-todo`,
    ...config,
  }) 
}

/**
 * 获取正在进行中的流程
 * @doc http://hanma-lesscode.hc-iiot.com/swagger-ui.html#!/
 * ********
 * @returns
 * ********
 */
export function getHmprocessruntimeProcessOngoing(config={}){
  return request({
    method: 'get',
    url: `/api/hm-process-runtime/process/ongoing`,
    ...config,
  }) 
}

/**
 * 完成任务
 * @doc http://hanma-lesscode.hc-iiot.com/swagger-ui.html#!/
 * data 参数 
 *  button:'', // 	类型:string 非必填
 *  carbonCopyInputs:'', // 	类型:array 非必填
 *  message:'', // 	类型:string 非必填
 *  modelKey:'', // 	类型:string 非必填
 *  processInstanceId:'', // 	类型:string 非必填
 *  processKey:'', // 	类型:string 非必填
 *  serviceKey:'', // 	类型:string 非必填
 *  taskId:'', // 	类型:string 非必填
 *  values:'', // 	类型:object 非必填
 * @returns
 * ********
 */
export function putHmprocessruntimeProcessOperation(data={}, config={}){
  return request({
    method: 'put',
    data,
    url: `/api/hm-process-runtime/process/operation`,
    ...config,
  }) 
}

/**
 * 接受任务
 * @doc http://hanma-lesscode.hc-iiot.com/swagger-ui.html#!/
 * data 参数 
 *  activityId:'', // 	类型:string 非必填
 *  processInstanceId:'', // 	类型:string 非必填
 * @returns
 * ********
 */
export function putHmprocessruntimeProcessReceive(data={}, config={}){
  return request({
    method: 'put',
    data,
    url: `/api/hm-process-runtime/process/receive`,
    ...config,
  }) 
}

/**
 * 启动流程
 * @doc http://hanma-lesscode.hc-iiot.com/swagger-ui.html#!/
 * data 参数 
 *  carbonCopyInputs:'', // 	类型:array 非必填
 *  processKey:'', // 	类型:string 非必填
 *  values:'', // 	类型:object 非必填
 * @returns
 * ********
 */
export function postHmprocessruntimeStart(data={}, config={}){
  return request({
    method: 'post',
    data,
    url: `/api/hm-process-runtime/start`,
    ...config,
  }) 
}

/**
 * 挂起流程
 * @doc http://hanma-lesscode.hc-iiot.com/swagger-ui.html#!/
 * data 参数 
 *  processInstanceId:'', // 	类型:string 非必填
 * @returns
 * ********
 */
export function postHmprocessruntimeSuspend(data={}, config={}){
  return request({
    method: 'post',
    data,
    url: `/api/hm-process-runtime/suspend`,
    ...config,
  }) 
}

/**
 * 任务重新分配处理人
 * @doc http://hanma-lesscode.hc-iiot.com/swagger-ui.html#!/
 * data 参数 
 *  taskId:'', // 	类型:string 非必填
 *  userId:'', // 	类型:integer 非必填
 * @returns
 * ********
 */
export function postHmprocessruntimeTaskassign(data={}, config={}){
  return request({
    method: 'post',
    data,
    url: `/api/hm-process-runtime/task-assign`,
    ...config,
  }) 
}

/**
 * 获取用户任务节点表单ID
 * @doc http://hanma-lesscode.hc-iiot.com/swagger-ui.html#!/
 * params 参数 
 * taskId:'', //taskId 必填
 * @returns
 * ********
 */
export function getHmprocessruntimeTaskformkey(params={}, config={}){
  return request({
    method: 'get',
    params,
    url: `/api/hm-process-runtime/task-form-key`,
    ...config,
  }) 
}

/**
 * 需要去处理的任务
 * @doc http://hanma-lesscode.hc-iiot.com/swagger-ui.html#!/
 * params 参数 
 * processId:'', //流程ID 非必填
 * searchKey:'', //搜索关键字 非必填
 * pageNo:'', //页码 非必填
 * pageSize:'', //每页数据条数 非必填
 * @returns
 * ********
 */
export function getHmprocessruntimeTaskTodo(params={}, config={}){
  return request({
    method: 'get',
    params,
    url: `/api/hm-process-runtime/task/todo`,
    ...config,
  }) 
}

/**
 * 需要去处理的任务数
 * @doc http://hanma-lesscode.hc-iiot.com/swagger-ui.html#!/
 * ********
 * @returns
 * ********
 */
export function getHmprocessruntimeTaskTodoCount(config={}){
  return request({
    method: 'get',
    url: `/api/hm-process-runtime/task/todo/count`,
    ...config,
  }) 
}